package com.iflysse.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.iflysse.service.AccountService;
import com.iflysse.vo.AjaxResult;

@RequestMapping("/user")
@RestController
public class UserController {
	
	@Autowired
	private AccountService accountService;

	@PostMapping("/queryUserInfo")
	public AjaxResult queryUserInfo(String userId, String role) {
		Map resp = accountService.findUserInfoByUserIdAndRole(userId, role);
		return AjaxResult.success(resp);
	}
		
}
